﻿using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using UnityEngine;

namespace WorldMap
{
    /// <summary>
    /// 地图所用tile集合数据
    /// </summary>
    public class TileSetData : ScriptableObject
    {
   
    
        [CanBeNull] public List<TileData> tiles;

        public void SetData(List<TileData> tileDatas)
        {

            this.tiles = tileDatas;
        }

        public List<TileData> GetData()
        {
            return tiles;
        }

        public TileData getTileData(string name)
        {
            return tiles.Where(item => item.name == name).First();
        }

    }
}


